import axios from "@/api/httpRequest";
export function updateInvoice(params) {
  return axios({
    method: "post",
    url: "/invoice/updateInvoice",
    headers: {
      token: sessionStorage.getItem("token")
    },
    params: params
  });
}

export function getUserDetail() {
  return axios({
    method: "get",
    url: "/user/get",
    headers: {
      token: sessionStorage.getItem("token")
    }
  });
}

export function logoutCommon() {
  return axios({
    method: "get",
    url: "/user/out",
    headers: {
      token: sessionStorage.getItem("token")
    }
  });
}

export function checkUsernameCommon(params) {
  return axios({
    method: "get",
    url: "/user/checkUsername",
    params
  });
}
export function loginCommon(params) {
  return axios({
    method: "post",
    url: "/user/login",
    params: params
  });
}

export function resetCommon(data){
    return axios({
      method: "post",
      url: "/user/reset",
      data
    })
}

export function updateUserCommon(data){
  return axios({
    method: "post",
    url: "/user/updateUser",
    data,
    headers: {
      token: sessionStorage.getItem("token")
    }
  })
}

export function getZipCommon(data){
  return axios({
    method: "post",
    url: "/file/getZip",
    data,
    headers:{
      token: sessionStorage.getItem("token")
    }
  })
}